# -*- coding:utf-8 -*-
from selenium.webdriver.common.by import By
from BasePage.BasePage import *
from Common.Config import *
from selenium import webdriver

class LoginPage(basepage):

    url = login_url
    company = (By.ID, 'company')
    user = (By.ID, 'account')
    password = (By.ID, 'pass')
    login_button = (By.XPATH, '//button[@type="submit"]')

    def login(self, company, account, password):
        self.AccessUrl(self.url)
        self.ElementInput(*self.company, company)
        self.ElementInput(*self.user, account)
        self.ElementInput(*self.password, password)
        self.ElementClick(*self.login_button)

